package com.ujoku.controller;

import com.labillusion.core.platform.web.rest.RESTController;
import com.ujoku.domain.Seo;
import com.ujoku.request.SeoForm;
import com.ujoku.service.SeoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.validation.Valid;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by admin on 2015/5/6.
 */
@Controller
public class SeoController extends RESTController {

    @Autowired
    private SeoService seoService;

    @RequestMapping(value = "/seo", method = RequestMethod.POST)
    @ResponseBody
    public Seo rewardList(@RequestBody @Valid SeoForm form){

        return seoService.selectByUrl(form.getUrl());
    }
}
